package com.gmrz.uap.config;

import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.servlet.GuiceServletContextListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.annotation.WebListener;

/**
 * @author Wang Haifeng
 */
@WebListener
public class SystemGuiceServletConfig extends GuiceServletContextListener {

    private static final Logger log = LoggerFactory.getLogger(SystemGuiceServletConfig.class);

    @Override
    protected Injector getInjector() {
        log.info("SystemGuiceServletConfig getInjector");
        return Guice.createInjector(new WebModule());
    }
}
